/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 供应商档案Entity
 * @author HOHD
 * @version 2020-12-09
 */
@Table(name="st_supplier_contact", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="联系人", queryType=QueryType.LIKE),
		@Column(name="fix_phone", attrName="fixPhone", label="固定电话"),
		@Column(name="email", attrName="email", label="邮箱"),
		@Column(name="weixin", attrName="weixin", label="微信"),
		@Column(name="phone", attrName="phone", label="手机号码"),
		@Column(name="title", attrName="title", label="职务", queryType=QueryType.LIKE),
		@Column(name="main_contact", attrName="mainContact", label="主联系人"),
		@Column(name="supplier_id", attrName="supplierId.id", label="供应商id"),
	}, orderBy="a.id ASC"
)
public class StSupplierContact extends DataEntity<StSupplierContact> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 联系人
	private String fixPhone;		// 固定电话
	private String email;		// 邮箱
	private String weixin;		// 微信
	private String phone;		// 手机号码
	private String title;		// 职务
	private Integer mainContact;		// 主联系人
	private StSupplierRecord supplierId;		// 供应商id 父类
	
	public StSupplierContact() {
		this(null);
	}


	public StSupplierContact(StSupplierRecord supplierId){
		this.supplierId = supplierId;
	}
	
	@Length(min=0, max=5, message="联系人长度不能超过 5 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=20, message="固定电话长度不能超过 20 个字符")
	public String getFixPhone() {
		return fixPhone;
	}

	public void setFixPhone(String fixPhone) {
		this.fixPhone = fixPhone;
	}
	
	@Length(min=0, max=40, message="邮箱长度不能超过 40 个字符")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	@Length(min=0, max=30, message="微信长度不能超过 30 个字符")
	public String getWeixin() {
		return weixin;
	}

	public void setWeixin(String weixin) {
		this.weixin = weixin;
	}
	
	@Length(min=0, max=18, message="手机号码长度不能超过 18 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=10, message="职务长度不能超过 10 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public Integer getMainContact() {
		return mainContact;
	}

	public void setMainContact(Integer mainContact) {
		this.mainContact = mainContact;
	}
	
	@Length(min=0, max=36, message="供应商id长度不能超过 36 个字符")
	public StSupplierRecord getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(StSupplierRecord supplierId) {
		this.supplierId = supplierId;
	}
	
}